import Vue from "vue";
import VueRouter from "vue-router";
import loginView from "@/views/loginView.vue";
import HomeView from "@/views/HomeView.vue";

import EmpView from "@/components/EmpView.vue"
import hello from "@/components/HelloWorld.vue"

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/login",
    meta: { t:true }
  },
  {path:"/login",component:loginView, meta: { t:true }},
  {path:"/home",component:HomeView,
  children:[
    {path:"EmpView",component:EmpView},
    {path:"hello",component:hello}
  ]
}
  // {
  //   path: "/about",
  //   name: "about",
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () =>
  //     import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
  // },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
